<div data-hook="admin_user_form_fields" class="row">
  <div class="col-12 col-md-6">
    <%= f.field_container :email, class: ['form-group'] do %>
      <%= f.label :email, Spree.t(:email) %>
      <%= f.email_field :email, class: 'form-control' %>
      <%= f.error_message_on :email %>
    <% end %>

    <div data-hook="admin_user_form_roles" class="form-group">
      <strong><%= Spree.t(:roles) %></strong>
      <%= f.collection_check_boxes :spree_role_ids, Spree::Role.all, :id, :name do |role_form| %>
        <div class="checkbox">
          <%= role_form.label for: "user_spree_role_#{role_form.object.name}" do %>
            <%= role_form.check_box id: "user_spree_role_#{role_form.object.name}" %>
            <%= role_form.object.name %>
          <% end %>
        </div>
      <% end %>
    </div>
  </div>

  <div data-hook="admin_user_form_password_fields" class="col-12 col-md-6">
    <%= f.field_container :password, class: ['form-group'] do %>
      <%= f.label :password, Spree.t(:password) %>
      <%= f.password_field :password, class: 'form-control' %>
      <%= f.error_message_on :password %>
    <% end %>

    <%= f.field_container :password_confirmation, class: ['form-group'] do %>
      <%= f.label :password_confirmation, Spree.t(:confirm_password) %>
      <%= f.password_field :password_confirmation, class: 'form-control' %>
      <%= f.error_message_on :password_confirmation %>
    <% end %>
  </div>
</div>
